package com.dj.usercenter.controller;

import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.context.request.NativeWebRequest;


@RestController
@RequestMapping("/user")
public class UserController {

    @GetMapping("/test")
    public String test(NativeWebRequest nativeWebRequest){
//        HttpServletRequest request = nativeWebRequest.getNativeRequest(HttpServletRequest.class);
//        String userId = request.getHeader("id");
//        request.getHeaderNames();
//        request.getParameterMap();
//        return "success: "+userId+request.getHeader("user-agent");
        return "sucess";
    }
}
